//
//  AliMNSHttp.h
//  AlibabaCloudMNSiOS
//
//  Created by David Chen on 28/03/2017.
//  Copyright © 2017 AliCloud. All rights reserved.
//

@interface AliMNSHttpRequestInternal : NSObject
@property NSString* method;
@property NSString* uri;
@property NSMutableDictionary* header;
@property NSData* data;
@end

@interface AliMNSHttpResponseInternal : NSObject
@property NSString* status;
@property NSDictionary* header;
@property NSData* data;
@property NSError* error;
@end

@interface AliMNSHttp : NSObject
{
    NSString* host;
    NSInteger connectionTimeout;
    BOOL keepAlive;
    NSInteger requestSize;
    NSInteger responseSize;
    BOOL isHttps;
}

@property NSString* host;
@property NSInteger connectionTimeout;
@property BOOL keepAlive;
@property NSInteger requestSize;
@property NSInteger responseSize;
@property BOOL isHttps;

-(void) sendSyncRequest:(AliMNSHttpRequestInternal*) httpRequest
       withResponse:(AliMNSHttpResponseInternal*)httpResponse;

-(void) sendAsyncRequest:(AliMNSHttpRequestInternal*) httpRequest
            withResponse:(AliMNSHttpResponseInternal*)httpResponse
             withHandler:(void (^)(AliMNSHttpResponseInternal* internalResponse))responseHandler;

@end
